<?php
/**
 * Created by PhpStorm.
 * Admininfo: Administrator
 * Date: 2017/12/15
 * Time: 14:19
 */

namespace app\admin\model;
use think\Model;

class Admingroup extends Model
{
    protected $autoWriteTimestamp = true;
    protected $createTime = 'create_time';
    protected $updateTime = 'last_time';
    protected $insert=[
        'status'=>1,
    ];
    protected function setMenuAttr($value)
    {
        if($value){
            return json_encode($value);
        }else{
            return false;
        }
    }
    protected function getMenuAttr($value)
    {
        if($value){
            return json_decode($value);
        }else{
            return false;
        }
    }
}